package multiThread.security;

/**
 * @projectName: java-sample
 * @description:
 * @author: Adam
 * @create: 2020-01-06 21:22
 **/

public class Thread2 extends Thread {

    public SecurityDemo securityDemo;

    public Thread2(){super();}

    public Thread2(SecurityDemo securityDemo){
        this.securityDemo = securityDemo;
    }

    @Override
    public void run(){
        securityDemo.setI(securityDemo.getI()+1);
        System.out.println(securityDemo.getI());
    }
}
